package visitor.fenpai;

/**
 * @Author: Doream
 * @Date: 2022/1/30 14:27
 */
public class Client {
    public static void main(String[] args) {
        Animal animal = new Animal();
        Animal dog = new Dog();
        Animal cat = new Cat();
        Execute execute = new Execute();
        execute.execute(animal);
        execute.execute(dog);
        execute.execute(cat);
        // 运行的结果，重载方法的分派是根据静态类型进行的，这个分派过程在编译时期就完成了
        //Animal
        //Animal
        //Animal
    }
}
